import React, { Component } from 'react'
import data from "../../components/pages/创建mv/data.json"
import Songs from '../pages/创建mv/Songs';
export default class Sings extends Component {
  state = {
    data
  }
  fn = (type) => {
    return () => {
      let newarr = this.state.data.map((iteam, index) => {
        if (index === type) {
          iteam.subed = !iteam.subed
        }
        return iteam
      })
    this.setState({
      data:newarr
    })

    }
  }
  render() {
    return (
      <Songs {...this.state} fn={this.fn}></Songs>

    )
  }
}
